<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>超市账单管理系统-供应商管理</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<script type="text/javascript">
function page_nav(frm,num){
	frm.pageIndex.value=num;
	frm.flag.value="fenye";
	frm.submit();
}
function jump_to(frm,pageno){
	var regexp=/^\d+$/;
	if(!regexp.test(pageno)){
		alert("请输入正确的数字");
		return false;
	}else{
		page_nav(frm,pageno);
	}	
}
</script>
<style>
ul{
	list-style:none;
	}
	.test_ul li{
	float:left;
	} 
	</style>
</head>
<body>

	<div class="menu">

		<table>
			<tbody>
				<tr>
					<td><form method="post" action="ProviderServlet">
							<input type="hidden" name="flag" value="fenye"/>
							<input type="hidden"  id="pageIndex"name="pageIndex" />
							供应商名称：<input name="proName" class="input-text" 
							type="text" value="${proName}">&nbsp;&nbsp;&nbsp;&nbsp;
							<input value="查 询" type="submit">
						</form>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
	<div class="main">

		<div class="optitle clearfix">
			<em><input value="添加供应商" class="input-button" onClick="window.location='providerAdd.jsp'" type="button">
			</em>
			<div class="title">供应商管理&gt;&gt;</div>
		</div>
		<div class="content">
			<table class="list">
				<tbody>
					<tr>
						<td width="70" height="29"><div class="STYLE1" align="center">编号</div>
						</td>
						<td width="80"><div class="STYLE1" align="center">供应商名称</div>
						</td>
						<td width="80"><div class="STYLE1" align="center">联系人</div>
						</td>
						<td width="100"><div class="STYLE1" align="center">联系电话</div>
						</td>
						<td width="100"><div class="STYLE1" align="center">传真</div>
						</td>
						<td width="100"><div class="STYLE1" align="center">操作时间</div>
						</td>
					</tr>
					<c:forEach var="pro" items="${proList}">
					<tr>
						<td height="23"><span class="STYLE1" >${pro.pro_id}</span>
						</td>
						<td><span class="STYLE1"><a href="ProviderServlet?flag=toView&id=${pro.pro_id}" style="color:red"> ${pro.pro_name}</a>
						</span>
						</td>
						<td><span class="STYLE1">${pro.pro_contact}</span>
						</td>
						<td><span class="STYLE1">${pro.pro_phone}</span>
						</td>
						<td><span class="STYLE1">${pro.pro_fax}</span>
						</td>
						<td><span class="STYLE1">${pro.op_time}</span>
						</td>
					</tr>
					</c:forEach>
				</tbody>
			</table>
			<div class="page-bar">
			<ul class="test_ul">
			<li>总记录数：${page.totalCount }&nbsp;&nbsp;${page.currPageNo } / ${page.totalPageCount }<li>&nbsp;&nbsp;&nbsp;
                             <li><a href="javaScript:page_nav(document.forms[0],1)" >首页</a><li>&nbsp;&nbsp;
                            <li><a href="javaScript:page_nav(document.forms[0],${page.currPageNo-1 })">上一页</a><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <li><a href="javaScript:page_nav(document.forms[0],${page.currPageNo+1 })">下一页</a><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <li><a href="javaScript:page_nav(document.forms[0],${page.totalPageCount })">末页</a><li>&nbsp;&nbsp;&nbsp;
			</ul>
			<span class="page-go-form"><label>跳转至</label><input type="text" name="numkey" id="numkey" class="page-key" />页<button type="submit" class="page-btn" onclick="javaScript:jump_to(document.forms[0],document.getElementById('numkey').value)">GO</button></span>
			</div>
		</div>
	</div>

</body></html>